# -*- coding: utf-8 -*-
import mysql.connector

# 连接数据库
cnx = mysql.connector.connect(
    host="172.31.120.53",
    user="fjkt_beta",
    password="yTbQYCyhJO7Vb5dS",
    database="edu_live"
)

# 创建游标对象
cursor = cnx.cursor()

id = 108952  # 定义id
for i in range(2):
    # 执行插入操作
    sql = "INSERT INTO `edu_live`.`edu_subscribe_remind`(`id`, `round_id`, `round_name`, `global_user_id`, `fj_user_id`, `state`, `round_start_time`, `update_time`, `create_time`, `room_id`, `source`) VALUES (%s, 28307, '预约场次0909--1', 'uid_578620846164819970', 'u230516163239SgVLPg176', 1, '2023-09-09 18:00:00', '2023-09-08 23:06:45', '2023-09-08 23:06:45', 'r_h70lcjc4cg0252', 2);" % id
    cursor.execute(sql)

    # 提交事务
    cnx.commit()
    print('插入成功')
    id += 1  # id自增1

# 关闭游标和连接
cursor.close()
cnx.close()
